package org.demo.algorithm.lagou.column.relearn;

/**
 * 数组反转
 */
public class ArrayReversal {

    public static void reversal(int[] source) {
        if (null == source) {
            return;
        }
        int length = source.length;
        for (int i = 0; i < length / 2; i++) {
            int temp = source[i];
            source[i] = source[length - i - 1];
            source[length - i - 1] = temp;
        }
    }

}
